# for num in range(1, 101):
#     if num % 7 == 0 or '7' in str(num):
#         print('拍拍手拍拍手',num)

# def print_gomoku_board(size):
#     line = "┏" + " ┯" * (size - 1) + " ┓"
#     print(line)
#
#     for _ in range(size - 1):
#         line = "┠" + "─┼" * (size - 1) + "─┨"
#         print(line)
#
#     line = "┗" + " ┷" * (size - 1) + " ┛"
#     print(line)




# Sensitive = ['打架', '共产党', '毛主席']
# text = input('请输入内容：')
# for Sensitive in Sensitive:
#     text = text.replace(Sensitive, '*'*len(Sensitive))
# print(text)
'''
文本进度条
'''
# import time
# print("="*10+"开始下载"+"="*10)
# for i in range(1, 101):
#     print("\r", end="")
#     print("{}%:".format(i), "*" * (i // 5), end="")
#     sys.stdout.flush()
#     time.sleep(0.05)
# print("\n"+"="*10+"下载完成"+"="*10)



commodity = {
    '1': {'price': 8.9, 'name': '面包'},
    '2': {'price': 10, 'name': '牛奶'},
    '3': {'price': 15, 'name': '果汁'},
    '4': {'price': 5.8, 'name': '苹果'}
}
commodity_id = input('请输入商品编号：')
commodity_count = int(input('请输入商品数量'))
commodity_sum = commodity[commodity_id]['price'] * commodity_count
money = int(input('请输入付款金额：'))
change = money - commodity_sum
print('总价：', commodity_sum)
print('找零：', change)